2、ons配置文件在grid的安装目录下/u01/app/11.2.0.4/grid/opmn/conf more ons.config
1 2 3 4 5
usesharedinstall=true allowgroup=true localport=6100 # line added by Agent remoteport=6200 # line added by Agent nodes=rac1:6200,rac2:6200 # line added by Agent
netstat -tunlp|grep ons (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) tcp 0 0 127.0.0.1:6100 0.0.0.0:* LISTEN 2230/ons tcp6 0 0 ::1:6100 :::* LISTEN 2230/ons tcp6 0 0 :::6200 :::* LISTEN 2230/ons
4、onsctl命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[grid@rac1 opmn]$ onsctl help usage: onsctl [verbose] <command> [<options>] The verbose option enables debug tracing and logging (for the server start). Permitted <command>/<options> combinations are: command options ------- --------- start - Start ons shutdown - Shutdown ons reload - Trigger ons to reread its configuration file debug [<attr>=<val> ..] - Display ons server debug information set [<attr>=<val> ..] - Set ons log parameters query [<attr>=<val>] - Query ons log parameters ping [<max-retry>] - Ping local ons help - Print brief usage description (this) usage [<command>] - Print detailed usage description
停止ons服务 [grid@rac1 opmn]$ onsctl stop CRS-2673: Attempting to stop 'ora.ons' on 'rac1' CRS-2677: Stop of 'ora.ons' on 'rac1' succeeded 查看ons服务在节点1上已经offline [grid@rac1 opmn]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.ons OFFLINE OFFLINE rac1 ONLINE ONLINE rac2 使用ons的ping参数去测试节点,提示ons已经没有运行了 [grid@rac1 opmn]$ onsctl ping ons is not running ... 重新启动ons [grid@rac1 opmn]$ onsctl start CRS-2672: Attempting to start 'ora.ons' on 'rac1' CRS-2676: Start of 'ora.ons' on 'rac1' succeeded